<?php
// 删除购物车商品
require_once $this->website['path']['action'] . '/app/token.php';

$json = array('status' => 'error', 'msg' => '', 'data' => '');
$uid = $basic['uid'];
$cid = fn_post('cid');
$arrCid = explode(',', $cid);

$in = rtrim(str_pad('?', 2 * count($arrCid), ',?'), ',');
$arr = array_merge([$uid], $arrCid);

$this->website['class']['db']
	->table('product_cart')
	->where('uid=? and id in(' . $in . ')', $arr)
	->delete();

$json['status'] = 'ok';
$json['msg'] = '删除成功';

$this->json_encode_encrypt($json);